﻿using System.Web.Mvc;

namespace Yyyg.WebUI.Filter
{
    /// <summary>
    /// 验证管理员登陆
    /// </summary>
    public class AdminLoginCkeckFilterAttribute : ActionFilterAttribute
    {
        public override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            base.OnActionExecuting(filterContext);
            if (filterContext.HttpContext.Session["admin"] == null)
            {
                filterContext.HttpContext.Response.Redirect("BackStage/Login", true);
            }
        }
    }
}